﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;

namespace FYSJcrm.Core.Model.PermManage
{
    [Table(Name = "FYSJ_ManagerRole")]
    public class ManagerRoleEntity : BaseEntity
    {
        /// <summary>
        /// 角色名称
        /// </summary>
        [Column(StringLength = 30, IsNullable = false)]
        public string RoleName { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        [Column(StringLength = 500)]
        public string Remark { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        [Column(CanUpdate = false)]
        public DateTime AddTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 管理员角色权限信息
        /// </summary>
        [Navigate(nameof(PermissionEntity.RoleId))]
        public ICollection<PermissionEntity> Permissions { get; set; }
    }
}
